﻿







using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StringBuilderDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder sb = new StringBuilder();
            Console.WriteLine("请输入您的姓名");
            string name = Console.ReadLine();
            Console.WriteLine("请输入您的年龄");
            string age = Console.ReadLine();
            Console.WriteLine("请输入您的家庭住址");
            string add = Console.ReadLine();
            Console.WriteLine("请输入您的兴趣爱好");
            string hobby = Console.ReadLine();
            //4.Append连接 接收到的变量
            sb.Append($"姓名{name}、年龄{age}、家庭住址{add}和兴趣爱好{hobby}");
            Console.WriteLine(sb);
        }
    }
}
